package org.real.guetshop.controller;

import jakarta.annotation.Resource;
import org.real.guetshop.utils.EmailUtil;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/email")
public class Test {

    @Resource
    private EmailUtil emailUtil;


    @PostMapping
    public String sendEmail(@RequestParam String email) {
        emailUtil.sendEmail(email);
        return "Email sent";
    }
}
